A toner cartridge including a casing for storing toner and a detection gear is well known in the art. In a state where the toner cartridge is attached to an image-forming apparatus, the detection gear is configured to rotate from a first position to a second position. In a state where the detection gear is rotated to the second position from the first position, the detection gear is positioned between a light-emitting element of the image-forming apparatus and a light-receiving element of the image-forming apparatus so that the detection gear can block light emitted from the light-emitting element. The light-emitting element and the light-receiving element may be both disposed near one end of the casing of the toner cartridge in a state where the toner cartridge is attached to the image-forming apparatus.